<template>
  <v-data-table :headers="headers" :items="desserts" class="elevation-1" disable-sort hide-default-footer>
    <!--          <template v-slot:item.calories="{ item }">-->
    <!--            <v-chip-->
    <!--                :color="getColor(item.calories)"-->
    <!--                dark-->
    <!--            >-->
    <!--              {{ item.calories }}-->
    <!--            </v-chip>-->
    <!--          </template>-->
    <template v-slot:[`item.rank`]="{ index }">
      <div class="mt-6 mb-6">
        <img style="height: 40px" v-if="index < 3" :src="rank_img[index]" />
        <h3 v-else>{{ index + 1 }}</h3>
      </div>
    </template>
    <template v-slot:[`item.avatar`]="{ item }">
      <v-avatar size="50" class="mt-4 mb-4">
        <v-img :src="item.avatar" />
      </v-avatar>
    </template>
  </v-data-table>
</template>

<script>
export default {
  name: "ScholarRank",
  data() {
    return {
      rank_img: [
        "https://originalfileserver.aminer.cn/sys/aminer/ranking/ranking_rank_first.png",
        "https://originalfileserver.aminer.cn/sys/aminer/ranking/ranking_rank_sen.png",
        "https://originalfileserver.aminer.cn/sys/aminer/ranking/ranking_rank_third.png",
      ],
      headers: [
        {
          text: "排名",
          align: "center",
          value: "rank",
        },
        {
          text: "头像",
          align: "center",
          value: "avatar",
        },
        {
          text: "姓名",
          align: "center",
          value: "name",
        },
        {
          text: "论文数",
          align: "center",
          value: "paper",
        },
        {
          text: "引用数",
          align: "center",
          value: "citation",
        },
        {
          text: "H-index",
          align: "center",
          value: "hindex",
        },
      ],
      desserts: [
          {
          avatar: "https://static.aminer.cn/upload/avatar/888/671/284/53f366a7dabfae4b3499c6fe_1316056033384.jpeg",
          name: "Geoffrey E. Hinton",
          paper: 423,
          citation: 571713,
          hindex: 166,
        },
        {
          avatar: "https://static.aminer.cn/upload/avatar/1387/343/295/53f4ba75dabfaed83977b7db_0.jpg",
          name: "Yoshua Bengio",
          paper: 994,
          citation: 457997,
          hindex: 188,
        },
        {
          avatar: "https://static.aminer.cn/upload/avatar/1168/1844/414/5433fe08dabfaebba5834f0c_0.jpg",
          name: "Shinji Kunori",
          paper: 1872,
          citation: 342713,
          hindex: 196,
        },
        {
          avatar: "https://static.aminer.cn/upload/avatar/341/1155/447/53f4516bdabfaefedbb3e7e8_1.jpg",
          name: "Robert Samuel Langer",
          paper: 2482,
          citation: 303815,
          hindex: 279,
        },
        {
          avatar: "https://static.aminer.cn/upload/avatar/1847/1122/35/53f475b6dabfaedd74ea6593_0.png",
          name: "Andrei Shleifer",
          paper: 561,
          citation: 292829,
          hindex: 139,
        },
        {
          avatar: "https://static.aminer.org/upload/avatar/1003/1374/1820/54069641dabfae44f08442b5.jpeg",
          name: "George O. Alverson",
          paper: 2059,
          citation: 282104,
          hindex: 170,
        },
        {
          avatar: "https://static.aminer.cn/upload/avatar/645/1767/1124/53f4340adabfaec22ba6a6f8_0.png",
          name: "Ross B. Girshick",
          paper: 122,
          citation: 202056,
          hindex: 71,
        },
        {
          avatar: "https://static.aminer.cn/upload/avatar/780/1342/445/53f45a4bdabfaec09f2142cd.jpg",
          name: "Ovsat B. Abdinov",
          paper: 928,
          citation: 175694,
          hindex: 120,
        },
        {
          avatar: "https://static.aminer.cn/upload/avatar/582/1586/1861/53f4677bdabfaeb1a7c915a5_1.png",
          name: "Oriol Vinyals",
          paper: 168,
          citation: 162130,
          hindex: 84,
        },
        {
          avatar: "https://static.aminer.cn/upload/avatar/108/904/916/53f4380edabfaeee229ba54c_1.png",
          name: "贾扬清",
          paper: 69,
          citation: 158446,
          hindex: 38,
        },

        // {
        //   fullname: "Annual Conference on Neural Information Processing Systems",
        //   shortname: "NeurIPS",
        //   map: 0.08,
        //   level: "A",
        // },
        // {
        //   fullname: "International Conference on Computer Vision",
        //   shortname: "ICCV",
        //   map: 0.01,
        //   level: "A",
        // },
        // {
        //   fullname: "International Conference on Machine Learning",
        //   shortname: "ICML",
        //   map: 0.09,
        //   level: "A",
        // },
        // {
        //   fullname: "European Conference on Computer Vision",
        //   shortname: "ECCV",
        //   map: 0.26,
        //   level: "B",
        // },
        // {
        //   fullname: "AAAI Conference on Artificial Intelligence",
        //   shortname: "AAAI",
        //   map: 0.04,
        //   level: "A",
        // },
        // {
        //   fullname: "Bioinformatics",
        //   shortname: "——",
        //   map: "——",
        //   level: "B",
        // },
        // {
        //   fullname: "Annual Meeting of the Association for Computational Linguistics",
        //   shortname: "ACL",
        //   map: 0.04,
        //   level: "A",
        // },
        // {
        //   fullname: "IEEE Transactions on Image Processing",
        //   shortname: "TIP",
        //   map: 0.28,
        //   level: "A",
        // },
        // {
        //   fullname: "IEEE Transactions on Wireless Communications",
        //   shortname: "TWC",
        //   map: 0.2,
        //   level: "B",
        // },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.bold {
  font-weight: bold;
}
</style>
